<template>
  <div>
    <h3>姐姐</h3>
    <h3>压岁钱：{{ money }}元</h3>
    <h3>玩具：{{ toy }}</h3>
    <button @click="mouseReduce($parent)">减少父亲的娃娃数量</button>
  </div>
</template>

<script setup lang='ts' name="Child1">
import { ref, reactive } from 'vue'

let toy = ref("变形金刚")
let money = ref(2000)
function mouseReduce(parent:any){
    // console.log(parent,"parent");
    // console.log(parent.sum,"parent");
    parent.sum--;
    
    
}
defineExpose({toy,money})

</script>


<style lang='scss' scoped>

</style>